home *** CD-ROM | disk | FTP | other *** search
/ synchro.net / synchro.net.tar / synchro.net / main / GAMES / cs2d.exe / {app} / help / scripting.txt < prev    next >
Encoding:
Text File  |  2009-03-30  |  2.7 KB  |  36 lines

  1. ⌐255255255- What is Scripting? -
  2. Scripting allows you to control CS2D. Most script commands change some settings of the game. All settings you make in the options menu are saved as scripts too! Moreover you can create scripts for buying several items with just one key (buyscripts) and so on.
  3. You can enter your scripts in the console or save them to files and execute these files with CS2D!
  4.  
  5. ⌐255255255- Alias -
  6. One general technique of scripting are aliases. Aliases are something like shortcuts. For example the following:
  7. ⌐000255000alias "getstuff" "m4a1; deagle"
  8. This will create a new command (alias/shortcut) called "getstuff"! You can use this command like all other commands. As soon as you call it you will buy a M4A1 and a Desert Eagle!
  9. Another important point here: commands are seperated with ;! You don't have to set ; but it is recommended.
  10. Another example:
  11. ⌐000255000alias "lol" "say LOLROFLOMG!"
  12. This will make you say "LOLROFLOMG!" after entering "lol" in your console!
  13.  
  14. ⌐255255255- Bind -
  15. Entering commands in your console is not a good solution if you plan to do it very often. That is the reason why there are binds! You can easily bind commands to keys. It works like this:
  16. ⌐000255000bind "C" "say COOL"
  17. Now you will say COOL when you press C.
  18.  
  19. ⌐255255255- Exec -
  20. Please note that CS2D does NOT save your binds and aliases. The best solution to keep your aliases and binds is to write them to cfg-files! Use the windows texteditor or other plain ASCII text editors to create these files. Just write a txt-file and rename it to cfg.
  21. CS2D loads sys/autoexec.cfg automatically whenever you start CS2D. So it is a good idea to save your scripts in this file. Moreover you can also execute scripts in other files:
  22. ⌐000255000exec sys/mycfg.cfg
  23. This will execute the cfg-file mycfg.cfg in your sys-folder! All commands in this file will be executed.
  24. Warning: CS2D automatically creates some cfg-files in the sys-folder to save your settings. You should NOT add new commands to these files because CS2D will overwrites these files automatically and you will lose all added commands! Don't add new commands there:
  25. ⌐255000000controls.cfg - controls
  26. ⌐255000000editor.cfg - editor settings
  27. ⌐255000000filters.cfg - serverlist filter settings
  28. ⌐255000000mapcycle.cfg - map names only
  29. ⌐255000000more.cfg - advanced settings
  30. ⌐255000000server.cfg - server settings
  31.  
  32. ⌐255255255- More Commands -
  33. Alias, bind and exec are just three of the most important commands for scripting. There are many other commands. For example commands to move your player, commands to buy equipment, commmands to open menus and commands to change your server settings.
  34. A full list of all commands is available at ╗www.CS2D.com/help½!
  35.  
  36. ╗Return½